﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for PlateType
/// </summary>
public class PlateType
{
    #region Properties
    public int ID { get; set; }
    public string Name { get; set; }
    public int Price { get; set; }
    public string Description { get; set; }
    public Employee LastUser { get; set; }
    public DateTime LastUpdate { get; set; }
    #endregion
    public PlateType()
	{
		//
		// TODO: Add constructor logic here
		//
        this.ID = 0;
        this.Name = String.Empty;
        this.Price = 0;
        this.Description = String.Empty;
        this.LastUser = null;
        this.LastUpdate = DateTime.Now;
	}

    public IList<PlateType> GetAll()
    {
        return PlateTypeDAL.GetAll();
    }

    public string GetName
    {
        get
        {
            return PlateTypeDAL.GetName(this.ID);
        }

    }

    public PlateType GetById(int id)
    {
        return PlateTypeDAL.GetById(id);
    }

    public bool InsertOrUpdate(PlateType plateType)
    {
        return PlateTypeDAL.InsertOrUpdate(plateType);
    }

    public bool IsExistPlate(string p)
    {
        return PlateTypeDAL.IsExistPlatType(p);
    }

    public bool Delete(int id)
    {
        return PlateTypeDAL.Delete(id);
    }
}